﻿<UserControl x:Class="Windy.DragonCurve.Views.DragonCurveView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:v="clr-namespace:Windy.DragonCurve.Views"
             xmlns:m="clr-namespace:Windy.DragonCurve"
             x:Name="UserControl"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style TargetType="Path">
            <Setter Property="Stroke" Value="{Binding CurveBrush, ElementName=UserControl}"/>
            <Setter Property="StrokeThickness" Value="{Binding CurveThickness, ElementName=UserControl}"/>
            <!--<Setter Property="Data" Value="{Binding DragonCurve.Geometry, ElementName=UserControl, FallbackValue=M 0 0 L 20 20 L 0 20 Z, Mode=OneWay}"/>-->
        </Style>
    </UserControl.Resources>
    <UserControl.CommandBindings>
        <CommandBinding CanExecute="DragonCurveCommand_CanExecute" Executed="UpdateDragonCurveCommand_Executed" Command="{x:Static v:DragonCurveCommands.UpdateDragonCurveCommand}"/>
        <CommandBinding CanExecute="DragonCurveCommand_CanExecute" Executed="ResetDragonCurveCommand_Executed" Command="{x:Static v:DragonCurveCommands.ResetDragonCurveCommand}"/>
    </UserControl.CommandBindings>
    <Border BorderThickness="{Binding BorderThickness, ElementName=UserControl}"
            Background="{Binding Background, ElementName=UserControl}"
            BorderBrush="{Binding BorderBrush, ElementName=UserControl}">
        <ScrollViewer x:Name="PathContainer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"  />
    </Border>
</UserControl>
